<?php

namespace app\api\controller;

use app\api\model\wanlshop\Address;
use app\common\controller\Api;
use think\Db;

/**
 * 身份列表
 */
class Grade extends Api
{
    protected $noNeedLogin = ['index'];
    protected $noNeedRight = '*';

    public function index(){
        $list = model('app\common\model\Grades')->select();
        foreach ($list as $key=>$val){
            if(in_array($val['id'],[3,4])){
                $list[$key]['discount_price'] = $val['price']*30/100;
            }
        }
        $this->success('ok',$list);
    }




}
